<?php

namespace App\Admin\Tools\Task;

use Encore\Admin\Grid\Tools\AbstractTool;

class TaskProgressTool extends AbstractTool
{
    private int $id;
    private string $name;
    private array $data;

    public function __construct(int $id, string $name, array $data = [])
    {
        $this->id = $id;
        $this->name = $name;
        $this->data = $data;
    }

    /**
     * @inheritDoc
     */
    public function render()
    {
        return view('task.task_progress', [
            'data' => $this->data,
            'name' => $this->name,
            'id' => $this->id
        ]);
    }
}
